﻿using NUnit.Framework;
using Rhino.Commons.ForTesting;
using WineCellar.Business.Entities;

namespace WineCellar.Data.Tests
{
    
    public abstract class DatabaseFixture :DatabaseTestFixtureBase
    {
        [SetUp]
        public virtual void SetUp()
        {
            IntializeNHibernateAndIoC(PersistenceFramework.NHibernate,"../../windsor.boo",DatabaseEngine.MsSql2005Express,"wines_test",
                MappingInfo.From(typeof(Wine).Assembly));
            CurrentContext.CreateUnitOfWork();
        }

        [TearDown]
        public void TearDown()
        {
            CurrentContext.DisposeUnitOfWork();
        }
    }
}
